<?php

session_start();
include_once ("mysql_conn.php");
$pwd = $_POST['newpassword'];
$id = $_SESSION['id'];
$conn = new mysql_conn();
$conn-> add_upadate("update user set password = '".$pwd."' where id = ".$id.";");
if ($_SESSION['perssime']==1){
    echo "<script>alert('修改成功！');window.location='homeAdminSetting.php';</script>";
}else {
    echo "<script>alert('修改成功!');window.location='homeCustomerSetting.php';</script>";

}
?>